<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/includes.jsp"%>

<!DOCTYPE html>
<html lang="${currentLocale}">
<head>
<title>悠儿</title>
<%@ include file="/WEB-INF/common/meta.jsp"%>
<%@ include file="/WEB-INF/common/global_res.jsp"%>
</head>
<body>
	<%@ include file="/WEB-INF/common/header.jsp" %>

	<div class="container" id="topicList">
		<div class="row">
			<div class="span9">
				<ul class="nav nav-tabs">
				    <li class="active">
				    	<a href="${ctx}">我的文章</a>
				    </li>
				    <li>
				    	<a href="${ctx}">我关注的</a>
				    </li>
				 </ul>
				<c:forEach var="contentListView" items="${contentList}" varStatus="status">
	                <div class="home-topic-list row-fluid">
	                	<div class="span2">
	                		<br/>
	                		<br/>
	                		<button class="btn btn-mini" type="button">Mini button</button>
	                	</div>
	                	<div class="span10" style="width:520px;">
		                	<div class="row-fluid">
			                	<c:choose>
			                		<c:when test="${contentListView.typeId == 0}">
				                		<h4 class="home-title-h4">
						                	<a href="/article/${contentListView.id}">${contentListView.title}</a>
						                	<br/>
						                	<span class="home-topic-info"><a href="/u/${contentListView.website}">${contentListView.username}</a> &nbsp; ${contentListView.updDt}</span>
						                	<span class="home-topic-info pull-right">${contentListView.looks} / ${contentListView.likes} / ${contentListView.replies}</span>
					                	</h4>
			                			<div class="span12">
			                				<p>
			                					${contentListView.textS}
			                				</p>
			                			</div>
			                		</c:when>
			                		<c:when test="${contentListView.typeId == 1}">
			                			<h4 class="home-title-h4">
						                	<a href="/pictext/${contentListView.id}">${contentListView.title}</a>
						                	<br/>
						                	<span class="home-topic-info"><a href="/u/${contentListView.website}">${contentListView.username}</a> &nbsp; ${contentListView.updDt}</span>
						                	<span class="home-topic-info pull-right">${contentListView.looks} / ${contentListView.likes} / ${contentListView.replies}</span>
					                	</h4>
			                			<div class="span12 pic">
					                		<a href="/pictext/${contentListView.id}" target="_blank">
									            <c:choose>
									            	<c:when test="${contentListView.picIdsCount == 1}">
									            		<c:forEach var="picId" items="${contentListView.picIds}" varStatus="status">
											            	<c:url var="imgUrl" value="/img/picitem/n/${picId}.jpg" />
											            	<span class="pic-${status.index+1}"><img src="${imgUrl}" alt="title"><i></i></span>
											            </c:forEach>
									            	</c:when>
									            	<c:when test="${contentListView.picIdsCount == 3}">
									            		<c:forEach var="picId" items="${contentListView.picIds}" varStatus="status">
											            	<c:url var="imgUrl" value="/img/picitem/n/${picId}.jpg" />
											            	<span class="pic${status.index+1}"><img src="${imgUrl}" alt="title"><i></i></span>
											            </c:forEach>
									            	</c:when>
									            	<c:otherwise></c:otherwise>
									            </c:choose>
									        </a>
					                	</div>
			                		</c:when>
			                	</c:choose>
		                	</div>
	                	</div>
	                </div>
	                <div class="line_dashed"></div>
				</c:forEach>
				<section id="pageBar">
					${pageBar}	
				</section>
			</div>
			
			<div class="span3 rightbox">
				<div class="thumbnail pull-right" style="width:200px;">
                  <img src="${ctx}/res/imgs/test/52.jpg" alt="">
                  <div class="caption">
                  	<h5>${user.username}</h5>
                  	<p>${user.addDt} 加入悠儿</p>
                    <p>${user.aboutMe}</p>
                  </div>
                </div>
				<p style="padding-bottom: 20px;"></p>
			</div>
			
		</div>

	</div>

	<%@ include file="/WEB-INF/common/footer.jsp"%>

</body>
</html>